package com.netty.client;

import com.netty.listener.DefaultGenericFutureListener;
import com.netty.util.WrapperRequestMessage;
import com.netty.util.WrapperResponseMessage;

import io.netty.channel.Channel;
import io.netty.util.concurrent.Future;

public class NettyClient {
	
	public static DefaultGenericFutureListener sendMessage(Future<Channel> future, WrapperRequestMessage rquest){
		WrapperResponseMessage response = new WrapperResponseMessage();
		DefaultGenericFutureListener listener = new DefaultGenericFutureListener(response, rquest);
		if(null != future){
			future.addListener(listener);
		}
		return listener;
	}
	
}
